package com.example.sun.helloworld;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

public class MainActivity extends AppCompatActivity {

    private Button btndo;
    private TextView txtshow;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        btndo=(Button)findViewById(R.id.button);
        txtshow=(TextView)findViewById(R.id.textView);
        btndo.setOnClickListener(new View.OnClickListener() {
        public void onClick(View v) {
            txtshow.setPadding(0, 500, 500, 800);
            txtshow.setText("横眉冷对啥子呦，俯首甘为芽儿咯！");
         }
     });
    }

 /*   private Button.setOnClickListener btListener= new Button.OnClickListener(){
                Public void onClice(View v){
                    txtshow.setText("横眉冷对啥子呦，俯首甘为芽儿咯！");
                }

            };
*/
}
